//
//  ViewController.m
//  OC中AFN封装 同时支持post和get
//
//  Created by 王、小胜 on 16/7/22.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "ViewController.h"
#import "NetworkTools.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [[NetworkTools sharedTools]request:GET urlString:@"get" parameters:@{@"name":@"zhangsan",@"age":@18}finished:^(id result, NSError *error) {
        if (error!=nil) {
            NSLog(@"出错了");
            return ;
        }else{
            NSLog(@"%@",result);
        }
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
